package live.zs.fluentmybatis.entity;

import cn.org.atool.fluent.mybatis.annotation.FluentMybatis;
import cn.org.atool.fluent.mybatis.annotation.TableField;
import cn.org.atool.fluent.mybatis.annotation.TableId;
import cn.org.atool.fluent.mybatis.base.IEntity;
import cn.org.atool.fluent.mybatis.base.RichEntity;
import cn.org.atool.fluent.mybatis.functions.TableSupplier;
import java.io.Serializable;
import java.lang.Class;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * TbUserEntity: 数据映射实体定义
 *
 * @author Powered By Fluent Mybatis
 */
@SuppressWarnings("unchecked")
@Data
@Accessors(
    chain = true
)
@EqualsAndHashCode(
    callSuper = false
)
@FluentMybatis(
    table = "tb_user"
)
public class TbUserEntity extends RichEntity {
  private static final long serialVersionUID = 1L;

  /**
   */
  @TableId("id")
  private Long id;

  /**
   * 年龄
   */
  @TableField("age")
  private Integer age;

  /**
   * 创建时间
   */
  @TableField("create_time")
  private Date createTime;

  /**
   * 姓名
   */
  @TableField("name")
  private String name;

  /**
   * 手机号
   */
  @TableField("phone")
  private String phone;

  /**
   * 创建时间
   */
  @TableField("update_time")
  private Date updateTime;

  /**
   * 用户ID
   */
  @TableField("user_id")
  private Long userId;

  @Override
  public Serializable findPk() {
    return this.id;
  }

  @Override
  public final Class<? extends IEntity> entityClass() {
    return TbUserEntity.class;
  }

//  @Override
//  public final TbUserEntity changeTableBelongTo(TableSupplier supplier) {
//    return super.changeTableBelongTo(supplier);
//  }
//
//  @Override
//  public final TbUserEntity changeTableBelongTo(String table) {
//    return super.changeTableBelongTo(table);
//  }
}
